<?php use_helper('Javascript','Form');?>
<div class="form_title">Edit Cash/Check Payment for <?php echo $contact->getListName() ?></div>
<table class="form">
  <tr><th>Date:</th><td><?php echo $payment->getDocument()->getDocumentDate();?></td></tr>
  <tr><th>Payment#:</th><td><?php echo $payment->getPaymentType();?>-<?php echo $payment->getPaymentNumber();?></td></tr>
  <tr><th>Cash:</th><td><?php echo number_format($payment->getCash(),2);?></td></tr>
  <tr><th>Payment Date:</th> <td><?php echo $payment->getDocument()->getDocumentDate();?></td></tr>
  <tr><th>Payment#:</th> <td><?php echo $payment->getPaymentType();?>-<?php echo $payment->getPaymentNumber();?></td></tr>
  <tr><th>Cash:</th> <td><?php echo number_format($payment->getCash(),2);?></td></tr>
  <tr><th>Check#:</th> <td><?php echo $paymentChecks->getBankInitials()?>-<?php echo $paymentChecks->getAccountNumber()?>#<?php echo $paymentChecks->getCheckNumber()?></td></tr>
  <tr><th>Date:</th> <td><?php echo $paymentChecks->getCheckDate()?></td></tr>
  <tr><th>Amount:</th> <td><?php echo number_format($paymentChecks->getCheckAmount(),2)?></td></tr>
</table>
<?php
  echo
    form_remote_tag(
      array(
        'url'=>'payment/insertChecksInvoice',
        'update'=>sfConfig::get('app_windows_payment_form_id'),
        'loading'=>"$('indicator').show();",
        'complete'=>"$('indicator').hide();",
      )
    )
?>
  <?php include_partial('payment_checks_invoice_form',array('paymentChecksInvoiceForm'=>$paymentChecksInvoiceForm,))?>
  <center>
    <?php echo submit_tag('Save')?> | 
    <?php echo reset_tag('Reset')?> | 
    <?php 
      echo
        button_to_remote(
          'Cancel',
          array(
            'url'=>'payment/edit?payment_iden='.$payment_iden,
            'update'=>sfConfig::get('app_windows_payment_form_id'),
            'loading'=>"$('indicator').show();",
            'complete'=>"$('indicator').hide();",
          )
        );
    ?>
  </center>
</form>